Skip to content

docs: correct 1.3.0 upgrade notes and fix prerelease tooling - #686

Merged
dmealing merged 3 commits into
mainfrom
fm/mo-130-final-docs
Dec 1, 2026
Merged

dmealing merged 3 commits into
mainfrom
fm/mo-130-final-docs

Conversation

@dmealing

@dmealing dmealing commented Dec 1, 2026

Copy link
Copy Markdown
Member

What Changed

  • CHANGELOG.md 1.3.0 upgrade list: the render-time unknown-variable item now says generated Python render helpers change on regenerate (a verify=[PayloadField(...)] argument and one new import), and an inline render() without the field tree still renders an unknown variable as empty. The Python _write_model item adds a multi-line model_validator example (override _write_model, write through the code writer) and says a multi-line member cannot be returned from _emit_field_lines. The LEFT OUTER item adds the @filter: { "<hop>.id": { isNull: false } } escape hatch that keeps the old row-dropping behaviour.
  • tools/prerelease/prerelease-link.sh: install_detector leaves a tools/prerelease/detect-prerelease-pins.sh that the project already tracks untouched, so unlink has nothing to revert. docs/features/prerelease.md says so.
  • tools/prerelease/estate-run.sh: the version read-back joins a Version: line onto the Name: line before it, so uv pip show metaobjects output passes. Tests E21 (matching version on its own line passes) and E22 (other version fails) are added to tools/prerelease/test-estate-run.sh. A link-tool test in tools/prerelease/test-prerelease-link.sh covers link and unlink with a tracked detector.
Validation

Risk Assessment

✅ Low: The change adds CHANGELOG text and small guarded tooling fixes with executable tests. The Python _write_model example matches the real signature and the writer's text and blank behaviour, and every item in the intent is addressed.

Testing

Ran the two prerelease shell test suites on the target commit; both pass. Ran them again against the base-commit scripts to confirm the new cases catch the bugs: the pip-show read-back (E21) and the tracked-detector link/unlink checks fail before the fix. Ran the CHANGELOG's new multi-line model_validator example against the real Python generator. It emits a correctly indented method, accepts a valid date range and rejects an invalid one. The other CHANGELOG additions (render-helper change, LEFT OUTER escape hatch) are prose; they were reviewed in the diff but not run.

  • Live validation: ✅ go - 3 of 3 scenarios driven live against the product
Scenario Result Live Evidence
estate-run read-back accepts pip show-style output (Name and Version on separate lines) and still fails on a wrong version (real estate-run.sh, throwaway fixture) ✅ pass live test-estate-run.sh E21/E22 pass on target; E21 FAILS against base estate-run.sh
prerelease-link link then unlink on a project that tracks its own detect-prerelease-pins.sh leaves it unmodified and the project clean (real prerelease-link.sh, throwaway repo) ✅ pass live test-prerelease-link.sh: 3 new checks pass on target; all 3 FAIL against base prerelease-link.sh
CHANGELOG D4 multi-line member example, taken verbatim, works when an owned EntityModelGenerator subclass overrides _write_model ✅ pass live d4-multiline-member.txt: valid Booking accepted; invalid dates raise ValidationError containing the message
Evidence: CHANGELOG multi-line member example: generated module and validation result
# @generated by metaobjects — DO NOT EDIT.
# Source metadata: Booking (app::b::Booking)
# Extend in your own module (e.g. Booking_extra.py) — nothing imports it for you.

from __future__ import annotations

import datetime
from pydantic import BaseModel, model_validator


class Booking(BaseModel):
    starts_at: datetime.datetime
    ends_at: datetime.datetime

    @model_validator(mode="after")
    def _check_dates(self):
        if self.ends_at < self.starts_at:
            raise ValueError("ends_at before starts_at")
        return self


class BookingCreate(BaseModel):
    """GENERATED — CREATE input: auto-gen PK / @mutability readOnly omitted (writeOnce is settable here, once); @default/@autoSet optional; present values validated (FR-036)."""

    starts_at: datetime.datetime
    ends_at: datetime.datetime


class BookingPatch(BaseModel):
    """GENERATED — PATCH input: all fields optional (PK, @mutability readOnly and writeOnce excluded); present values validated (FR-036)."""

    starts_at: datetime.datetime | None = None
    ends_at: datetime.datetime | None = None

OK valid accepted
OK rejected: ValidationError True

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 1 info
  • ℹ️ tools/prerelease/prerelease-link.sh:1000 - A project-tracked detect-prerelease-pins.sh is now left untouched by link, which meets the "link leaves a tracked copy alone" option. The project's own copy, usually an older one, is now the file that lockfiles_with_prerelease (prerelease-link.sh:631-640, which sources PRERELEASE_RE_AWK and NS_RE_AWK from it) and run_detector (:1009-1012) use for unlink's residue verdict. The say message does not say that the older copy will govern unlink's residue check. Consider extending that message to say so (for example, "sync it from the candidate checkout if it is stale"). No behaviour change is required.
✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 3 of 3 scenarios driven live against the product
Scenario Result Live Evidence
estate-run read-back accepts pip show-style output (Name and Version on separate lines) and still fails on a wrong version (real estate-run.sh, throwaway fixture) ✅ pass live test-estate-run.sh E21/E22 pass on target; E21 FAILS against base estate-run.sh
prerelease-link link then unlink on a project that tracks its own detect-prerelease-pins.sh leaves it unmodified and the project clean (real prerelease-link.sh, throwaway repo) ✅ pass live test-prerelease-link.sh: 3 new checks pass on target; all 3 FAIL against base prerelease-link.sh
CHANGELOG D4 multi-line member example, taken verbatim, works when an owned EntityModelGenerator subclass overrides _write_model ✅ pass live d4-multiline-member.txt: valid Booking accepted; invalid dates raise ValidationError containing the message
  • scripts/ci-local.sh --affected --strict-toolchains
  • Broad regression: configured scripts/ci-local.sh --affected --strict-toolchains already ran and passed at the target commit; not re-run
  • bash tools/prerelease/test-estate-run.sh: all pass, including new E21 and E22
  • bash tools/prerelease/test-prerelease-link.sh: all pass, including the 3 new tracked-detector checks
  • Same two test scripts against the base-commit estate-run.sh and prerelease-link.sh: E21 and the 3 tracked-detector checks FAIL (E22 passes on both, so it only guards the join against a false pass)
  • CHANGELOG multi-line _write_model example run verbatim on the real Python EntityModelGenerator; generated module imported and exercised
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@dmealing
dmealing merged commit a56783e into main Dec 1, 2026
11 checks passed
@dmealing
dmealing deleted the fm/mo-130-final-docs branch December 1, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant